from django.contrib.auth.models import AbstractUser
from django.db import models

class CustomUser(AbstractUser):
    ROLE_CHOICES = (
        ('advertiser', '广告主'),
        ('editor', '广告编辑'),
        ('manager', '广告主管'),
    )
    role = models.CharField(max_length=20, choices=ROLE_CHOICES, default='advertiser')

    def __str__(self):
        return f"{self.username} ({self.role})"
